/*    */ package com.feeyin.radar.sys.dao.impl;
/*    */ 
/*    */ import com.feeyin.radar.sys.dao.RoleDAO;
/*    */ import com.feeyin.radar.sys.model.Role;
/*    */ import java.util.List;
/*    */ import org.springframework.orm.ibatis.SqlMapClientTemplate;
/*    */ import org.springframework.orm.ibatis.support.SqlMapClientDaoSupport;
/*    */ 
/*    */ public class RoleDAOImpl extends SqlMapClientDaoSupport
/*    */   implements RoleDAO
/*    */ {
/*    */   public List getRoles()
/*    */   {
/* 21 */     return getSqlMapClientTemplate().queryForList("getRoles");
/*    */   }
/*    */ 
/*    */   public Role getRole(Integer id) {
/* 25 */     return (Role)getSqlMapClientTemplate().queryForObject("getRole", id);
/*    */   }
/*    */ 
/*    */   public Integer getRoleMaxId() {
/* 29 */     return (Integer)getSqlMapClientTemplate().queryForObject("getRoleMaxId");
/*    */   }
/*    */ 
/*    */   public Role getRoleByRoleCode(String roleCode) {
/* 33 */     return (Role)getSqlMapClientTemplate().queryForObject("getRoleByRoleCode", roleCode);
/*    */   }
/*    */ 
/*    */   public Role getRoleByRoleName(String roleName) {
/* 37 */     return (Role)getSqlMapClientTemplate().queryForObject("getRoleByRoleName", roleName);
/*    */   }
/*    */ 
/*    */   public boolean insertRole(Role role) {
/* 41 */     Integer result = (Integer)getSqlMapClientTemplate().insert("insertRole", role);
/* 42 */     return result != null;
/*    */   }
/*    */ 
/*    */   public boolean updateRole(Role role)
/*    */   {
/* 47 */     Integer result = Integer.valueOf(getSqlMapClientTemplate().update("updateRole", role));
/* 48 */     return result != null;
/*    */   }
/*    */ 
/*    */   public boolean updateRoleMaxLimitNum(Role role)
/*    */   {
/* 53 */     Integer result = Integer.valueOf(getSqlMapClientTemplate().update("updateRoleMaxLimitNum", role));
/* 54 */     return result != null;
/*    */   }
/*    */ 
/*    */   public boolean deleteRole(Integer id)
/*    */   {
/* 59 */     Integer result = Integer.valueOf(getSqlMapClientTemplate().delete("deleteRole", id));
/* 60 */     return result != null;
/*    */   }
/*    */ }

/* Location:           C:\Users\e547415\MyProject\rone\WEB-INF\classes\
 * Qualified Name:     com.feeyin.radar.sys.dao.impl.RoleDAOImpl
 * JD-Core Version:    0.6.0
 */